Reject external connect: requests.
authorShaju Mathew <shaju@google.com>
Sat, 25 Jun 2022 14:57:31 +0000 (14:57 +0000)
committerEmmanuel Bourg <ebourg@apache.org>
Wed, 17 May 2023 07:45:36 +0000 (08:45 +0100)
commit51e8409a285eb9c03b02ec7c32bd94649cd036ac
tree2f8449489c4c3144cd3d552d7572b71fa244b5ce
parent943e8d5f26481fc9c95a5d343c24c8ad9057e9bd
Reject external connect: requests.

Steps:
  1. Track forward:reverse config in a data-structure.
  2. connect_to_remote() examines each socket transport and updates
    this data-structure.
  3. handle_packet() takes appropriate action
    (abort) for an unknown connect: request originating from the device.

Bug:205286508

Test: treehugger

Signed-off-by: jmgao <jmgao@fb.com>
Change-Id: I0ec7d6f8e60afc2ee5d1be2b63bf90ca99443a52

Gbp-Pq: Topic cve
Gbp-Pq: Name CVE-2022-3168.patch
system/core/adb/adb.cpp
system/core/adb/sockets.cpp
system/core/adb/transport.cpp
system/core/adb/transport.h